<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>huifu</title>
    <style type="text/css">
        *{
            padding: 5px;
        }
        #d1{
            width: 380px;
            margin: 0px auto;
            text-align: center;
        }
    </style>
    <script type="text/javascript" th:src="@{js/jquery-1.12.4.js}"></script>
    <script type="text/javascript">
        $(function(){
            $.post("huifu",function (data){
                var tab = $("#tab");
                var tr = "";
                $.each(data,function (index,item){
                    tr+="<tr><td>"+item.content+"</td><td>"+item.author+"</td><td>"+item.rtime+"</td></tr>";
                })
                tab.append(tr);
                $("tr:odd").css("background","#A3CAFB");
            },"json");
        })
    </script>
</head>
<body>

<div id="d1">
    <table border="1"  id="tab">
        <h2>回复信息表</h2>
        <p th:text="${str}"></p>
        <p style="text-align: right">
            <a href="add.html">添加回复</a>
            <a th:href="@{showAll}">返回列表</a>
        </p>
        <tr style="background-color: darkslateblue">
            <td>回复内容</td>
            <td>回复昵称</td>
            <td>回复时间</td>
        </tr>
    </table>
</div>

</body>
</html>